<%-- 
    Document   : dvd
    Created on : Mar 27, 2013, 5:51:09 PM
    Author     : Shaun McCready
--%>
<%@page import="org.domain.Item"%>
<%@page import="org.domain.Customer"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
   <head>
  <meta name="generator" content=
  "HTML Tidy for Linux/x86 (vers 25 March 2009), see www.w3.org" />

  <title>DVD Players - Products</title>
  <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
  <script type="text/javascript" src=
  "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
  <script type="text/javascript">
//<![CDATA[
  $(document).ready(function(){
        $('#nav li').hover(function () {
                $(this).find('.dropDown').slideToggle(200);
                $(this).toggleClass('active');
    });
  });
  //]]>
  </script>
</head>

<body>
  <div class="wrapper">
   	<div id="navContainer">
		<ul class="clear" id="nav">
			<li class="first"><a class="active" href="home.jsp">Home</a></li>
			<li><a class="selected" href="camera.jsp">Products</a>
				<div class="dropDown">
					<div class="top"></div>
					<div class="items">
						<ul>
							<li class="first"><a href="camera.jsp">Cameras</a></li>
							<li><a href="dvd.jsp">DVD Players</a></li>
							<li class="last"><a href="tv.jsp">Televisions</a></li>
						</ul>
					</div>
				</div>
			</li>
			<li><a href="order.jsp">Order</a></li>
			<li><a href="payment.jsp">Payment</a></li>
			<li class="last"><a href="logout">Logout</a></li>
		</ul>
	</div>
  </div>
<div class="shoppingcart" style="position:absolute; top:11px; right:25%; margin-right:0px;">
    <%
    String cart1 = request.getSession().getAttribute("cart").toString();
    int cart = Integer.parseInt(cart1);
    %>
    <img src="images/cart.png" width="30" height="30" />

    <span style="padding:0; color:silver;">Items: <%=cart%></span>

</div>
  <div id="mainContent">
    <h2>DVD Players</h2>

<%
            ArrayList<Item> inventory = (ArrayList<Item>)request.getSession().getAttribute("inventory");
            %>
    <center>
      <table>
        <tr>
          <td><img src="images/d1.jpg" alt="DVD Player 1" width="250" height="180" /></td>

          <td><img src="images/d2.jpg" alt="DVD Player 2" width="250" height="180" /></td>

          <td><img src="images/d3.jpg" alt="DVD Player 3" width="250" height="180" /></td>
        </tr>

        <tr>
          <td>
            <h3>DVD Player 1</h3>Brand: <%=inventory.get(0).getManufacturer()%><br />
            Max Resolution: 1080p<br />
            Price:$<%=inventory.get(0).getPrice() %><br />
            <form action="itemCart" method="POST">
			<input type="hidden" name="itemname" value="0" />
            <button type="submit">Add to Cart</button>
			</form>
          </td>

          <td>
            <h3>DVD Player 2</h3>Brand: <%=inventory.get(3).getManufacturer()%><br />
            Max Resolution: 720p<br />
            Price:$<%=inventory.get(3).getPrice() %><br />
            <form action="itemCart" method="POST">
			<input type="hidden" name="itemname" value="3" />
            <button type="submit">Add to Cart</button>
			</form>
          </td>

          <td>
            <h3>DVD Player 3</h3>Brand: <%=inventory.get(6).getManufacturer()%><br />
            Max Resolution: 1080p<br />
            Price:$<%=inventory.get(6).getPrice() %><br />
            <form action="itemCart" method="POST">
			<input type="hidden" name="itemname" value="6" />
            <button type="submit">Add to Cart</button>
			</form>
          </td>
        </tr>
      </table>
    </center>
  </div>

  <div id="footer">
    <center>
 <a href="home.jsp">Home</a> | <a href="camera.jsp">Products</a> | <a href="order.jsp">Order</a> | <a href=
      "payment.jsp">Payment</a> | <a href="logout">Logout</a><br />
      Copyright 2013 by Company X. All Rights Reserved.
    </center>
  </div>
</body>
</html>